import java.util.Scanner;

/** 
   This program reads a student's final class average,
   and prints out the appropriate letter grade.
*/
public class DoGrades
{
   public static void main(String[] args)
   {
      // Print prompt to enter a final class average 
      System.out.println("Enter final class average: ");

      // Read in final class average
      Scanner in = new Scanner(System.in);
      double average = in.nextDouble();

      String finalGrade;

      // Determine and print final grade
     
      // Your work here
     
      if(average>90 && average<=100)
         finalGrade="A";
      else if(average>80 && average<=90)
         finalGrade="B";
      else if(average>70 && average<=80)
         finalGrade="C";
      else if(average>60 && average<=70)
         finalGrade="D";
      else
         finalGrade="F";
      System.out.println(finalGrade);
   }
}